<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<title>巡视详情页</title>
		<link href="../../css/mui.min.css" rel="stylesheet"/>
		<!--<link rel="stylesheet" href="../../css/CFNetPP_Base.css">-->
		<link rel="stylesheet" type="text/css" href="../../css/base.css"/>
			<link rel="stylesheet" type="text/css" href="../../css/weui.min.css"/>
		<style>
			html, body {
				margin: 0;
				border: 0;
				padding: 0;
				font-style: normal;
				background-color: #FFFFFF;
			}
			.line_heigt_px {
				line-height: 50px;
			}
			.div_right {
				margin-left: 10px;
			}
			.div {
				position: relative;
				padding-left: 100px;
				border-bottom: 1px solid #ECECEC;
				background-color: #FFFFFF;
				padding-top: 14px;
				padding-bottom: 14px;
				padding-right: 10px;
			}
			.div_left {
				width: 72px;
				font-size: 14px;
				font-weight: 400;
				text-align: right;
				position: absolute;
				left: 0;
			}
			.text_buju {
				margin-top: 10px;
				margin-left: 16px;
				margin-right: 10px;
			}
			.OnlyPic {
				max-width: 140px;
				margin-top: 10px;
				margin-left: 58px;
				
			}
			.weibo_weui_grid_icon {
				width: 100%;
				vertical-align: middle;
			}
			.weib_weibo_div {
				height: 80px;
				line-height: 80px;
				overflow: hidden;
				text-align: center;
				margin: 0 auto;
			}
			a, a:visited {
				text-decoration: none;
			}
			.weibo_weui_grid {
				position: relative;
				float: left;
				width: 33.33333333%;
				padding-right: 2px;
				padding-left: 2px;
				padding-top: 5px;
				box-sizing: border-box;
			}
			.weibo_weui_grids {
				position: relative;
				overflow: hidden;
				margin-left: 58px;
				margin-right: 30px;
			}
			#report{
			margin-left: 42px;
			}
			.border_top{
    	    border-top: 1px solid #ECECEC;
    
    	}
	</style>
		</style>
	</head>
	<body>
		<div class="base_style_color " id='BarAppearance' style="height: 22px;width: 100%"></div>
		<div class="base_navigation_bar base_style_color base_navigation_item_bar">
			<a class="base_left_item" href="#" onclick="backClick()"> <img class="base_back_icon" src="../../image/icon_jiantou.png" alt=""> </a>
			<span>查看巡视记录</span>
			<a class="base_right_item base_hide_item"> </a>
		</div>
		<div class="newcheckrecord " style="margin-top: 66px">
			<div class="mui-input-group font14 base_grey">
			<!--	<div class="mui-input-row line_heigt_px">
					<label>巡视单位:</label>
					<span  class="mui-input-clear "  id="trainelectcompany_id">你好你好你好你好你好你好你好你好你好你好</span>
				</div>-->
				<div class=" div border_top">
					<span class="div_left">巡视单位:</span>
					<em class="div_right"  id="trainelectcompany_id"></em>
				</div>
				<div class=" div">
					<span class="div_left">巡视学生:</span>
				<!--	<span  class="mui-input-clear" id="patrol_state"></span>-->
					<em class="div_right" id="patrol_state"></em>
				</div>
				<!--<div class="mui-input-row line_heigt_px">
					<label>巡视形式:</label>
					<span  class="mui-input-clear"  id="pator_form"></span>
				</div>-->
				<div class=" div ">
					<span class="div_left">巡视形式:</span>
					<em class="div_right"  id="pator_form"></em>
				</div>
				<!--<div class="mui-input-row line_heigt_px">
					<label>巡视时间:</label>
					<span  class="mui-input-clear"  id="pator_time"></span>
				</div>-->
				<div class=" div ">
					<span class="div_left">巡视时间:</span>
					<em class="div_right"  id="pator_time"></em>
				</div>
			</div>
		</div>
		<div class="text_buju">
			<label class="shuoming left_px">巡视报告：</label>
			<div>
			<span id="report" class=" font14 base_grey left_px   Word_wrap" style="  margin-top: 10px;" > </span>
		</div>
		</div>
		<div id="add_pic" >
	
		</div>
	</body>
	<script src="../../script/mui.min.js"></script>
	<script src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script src="../../script/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script type="text/javascript">
	var id="";
		apiready = function() {
		SendBehaviorTrajectoriesNotifi1('0', '巡视记录历史详情页', '117',api.pageParam.sourceurl, api.pageParam.sourcetitle, window.location.pathname,  document.title);
			api.showProgress({
			    style: 'default',
			    animationType: 'fade',
			    title: '加载中...',
			    text: '请稍候...',
			    modal: false
			});
			var pageParam = api.pageParam;
			if (pageParam) {
				id = pageParam.id;
			}
			get_data();

		};
		function backClick() {
//		SendBehaviorTrajectoriesNotifi('1', '巡视记录历史详情页', '117');
SendBehaviorTrajectoriesNotifi1('1', '巡视记录历史详情页', '117',api.pageParam.sourceurl, api.pageParam.sourcetitle, window.location.pathname,  document.title);
			api.closeWin();
		}

		function get_data() {
			params = {
                 uid: $api.getStorage('cfnetppuid'),
				school_id : $api.getStorage('cfnetppjid'),
				id : id,
			};
			cfnetppPOST(urlPatroinfo, params, true, function(data, status) {
              api.hideProgress();
                // alert(JSON.stringify(params));
//              alert(JSON.stringify(data));
				if (status == 'success') {
					if (data.status == 1) {
						list = data.json;
						adddata(list);
					} else {
						api.toast({
							msg : '数据异常'
						});
					}
				} else {
					api.toast({
						msg : '数据异常'
					});
				}
			});
		}
		//添加数据
		function adddata(data){
		if(data!='undefined'&&data!=null&&data!=""){
		$("#report").text(data.report);
		$("#patrol_state").text(data.student);
		$("#pator_form").text(data.form);
		$("#pator_time").text(getCurrentDate(data.time));
		$("#trainelectcompany_id").text(data.corpname);
		addPicture(data.imageurl);
		}
		}

		//图片显示
	function addPicture(dataext) {
	if ((dataext!='undefined'&&dataext!=null&&dataext!="")) {
		  var data=dataext;
	     var thumburl=data.thumburl;
	    var len= thumburl.length;
	    
	  if(len>0){
	  	  var pic=""
	    if(len==1){
	        var imageUrl=getpicurl((data.picurl)[0]);
		    api.imageCache({
				url : imageUrl,
				}, function(ret, err) {
					imageUrl = ret.url;
				});
	       pic = "<img class='OnlyPic ' src='" + imageUrl + "'  onclick='showimg(" + "\"" + data.picurl + "\",\"" + i + "\"" +" )'/>";
	     
	       }else{
			for(var i=0;i<len;i++){
			    var imageUrl=thumburl[i];
			    api.imageCache({
				url : thumburl[i],
		//	    policy:cache_else_network //若服务器上没有更新，则使用缓存
				}, function(ret, err) {
					imageUrl = imageUrl;
				});
	             var picHtml = "<a href='javascript:showimg(" + "\"" +data.picurl + "\",\"" + i + "\"" +" );' class='weibo_weui_grid weib_weibo_div'>  <img class='weibo_weui_grid_icon'   src='" + getpicurl(imageUrl) + "'  /></a>";
			     pic= pic+picHtml;
	              }
	             pic= "<div class='weibo_weui_grids text_buju '> "+pic+"</div>";
			   }
			   
			   $('#add_pic').html(pic);
			}	
	    }
	
	};
	</script>
</html>